<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<?php
//Tiina Võsumägi phpkursus1109 07.11
//1
$a=5;
$b=7;
$c=8;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a == 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//2
$a=5;
$b=4;
$c=8;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//3
$a=7;
$b=7;
$c=8;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//4
$a=5;
$b=5;
$c=25;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//5
$a=5;
$b=4;
$c=3;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a == 0 && $b == 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c )
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//6
$a=8;
$b=9;
$c=4;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//7
$a=6;
$b=3;
$c=5;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//8
$a=2;
$b=2;
$c=3;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a !== 0 && $b !== 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//9
$a=2;
$b=2;
$c=4;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a == 0 && $b == 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";


//10
$a=3;
$b=2;
$c=1;

if ($a < $b)
{
  $vastus = $b - $a + (1/$c);
  echo "Tehe 1, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $a == 0 && $b == 0)
{
  $vastus = pow ($a, $b);
  echo "Tehe 2, vastus on: " . $vastus . "<br>";
}
if ($a == $b)
{
  $vastus = ($a + $c) + ($b - $c);
  echo "Tehe 3, vastus on: " . $vastus . "<br>";
}
if ($a * $b == $c)
{
  $vastus = 2 *($a * $b) - $c;
  echo "Tehe 4, vastus on: " . $vastus . "<br>";
}
if ($a > $b && $b > $c)
{
  $vastus = ($a + $b) / $c;
  echo "Tehe 5, vastus on: " . $vastus . "<br>";
}
echo "( a=" . $a . " b=" . $b . " c=" . $c ." )<br>";
?>